package com.joymart.common.system.rest.authority;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jdbc.core.JdbcAggregateTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

import static com.joymart.common.utils.CollectionUtils.asList;

@Service
public class RestAuthorityService {

    @Autowired
    private JdbcAggregateTemplate jdbcAggregateTemplate;

    public List<RestAuthority> findAll(){
        return  asList(jdbcAggregateTemplate.findAll(RestAuthority.class));
    }

}
